//
//  RectView.m
//  AirQuality
//
//  Created by Mac on 16/1/3.
//  Copyright © 2016年 Po. All rights reserved.
//

#import "RectView.h"

@implementation RectView

- (instancetype)initWithFrame:(CGRect)frame withArray:(NSArray *)data
{
    self = [super initWithFrame:frame];
    if (self) {
        self.layer.borderColor = [UIColor grayColor].CGColor;
        self.layer.borderWidth = 1.0;
        for (NSUInteger i = 0; i < data.count; i ++) {
            UIView * view = [[UIView alloc] initWithFrame:CGRectMake(6*i+3, 60, 5, 60)];
            view.backgroundColor = [UIColor redColor];
            CGFloat value = [data[i] floatValue];
            [self addSubview:view];
        }
    }
    return self;
}

@end
